// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import app from './App'
import './lib/icons-extra.css'
import router from '../src/router.js'
import VueResource from 'vue-resource'
Vue.use(VueResource)
    //Vuex
import store from './vuex.js'

import preview from 'vue-preview'
Vue.use(preview, {
    mainClass: 'pswp--minimal--dark',
    barsSize: { top: 0, bottom: 0 },
    captionEl: false,
    fullscreenEl: false,
    shareEl: false,
    bgOpacity: 0.85,
    tapToClose: true,
    tapToToggleControls: false
})

import moment from 'moment'
//定义全局过滤器
Vue.filter('dataFormat', function(dataStr, pattern = moment.ISO_8601) {
    return moment(dataStr).format(pattern);
})

// import { Header, Swipe, SwipeItem, Button, Lazyload } from 'mint-ui'
// Vue.component(Header.name, Header);
// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);
// Vue.component(Button.name, Button);
// Vue.use(Lazyload)
//使用懒加载就需要全部导入
import MintUI from 'mint-ui';
Vue.use(MintUI);
import 'mint-ui/lib/style.css'
import './lib/mui.min.css'

/* eslint-disable no-new */
new Vue({
    el: '#app',

    render: a => a(app),
    router,
    store
})